<?php
/**
 * Created by PhpStorm.
 * User: zhuyujun
 * Date: 2017/10/26
 * Time: 10:52
 */

namespace App\Api\Service\Routes;

use Dingo\Api\Routing\Router;


class OrderRoute
{
    public function map(Router $router)
    {
        $router->group(['namespace' => 'Order\Controllers', 'prefix' => 'order'], function ($router) {
            //工单类型选择
            $setFunction = 'getOrderTypeAll';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工单类型分类
            $setFunction = 'getOrderTypeCategory';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工单类型提交
            $setFunction = 'orderTypeSubmit';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工单创建-基础信息-选项参数获取
            $setFunction = 'orderPreBaseInfo';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工单创建-基础信息-提交
            $setFunction = 'orderPreBaseSubmit';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工单创建-配送消息提交
            $setFunction = 'orderPreDistributionSubmit';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //获取工单列表
            $setFunction = 'getOrderList';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //获取客户订单列表
            $setFunction = 'getCustomerOrderList';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //获取版工单列表
            $setFunction = 'getPlateOrderList';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //获取工单详情
            $setFunction = 'getOrderDetail';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认开工
            $setFunction = 'confirmStart';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认领取材料基础页面
            $setFunction = 'confirmReceiveMaterialBaseInfo';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认领取材料
            $setFunction = 'confirmReceiveMaterial';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //添加材料
            $setFunction = 'addMaterial';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //删除材料
            $setFunction = 'deleteMaterial';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认开工后工单详情页面
            $setFunction = 'afterOrderDetail';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认领取完成
            $setFunction = 'confirmReceiveComplete';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认完工基础页面
            $setFunction = 'confirmCompleteBaseInfo';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认完工
            $setFunction = 'confirmComplete';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认完工后详情页面
            $setFunction = 'completeOrderDetail';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工序信息获取统一接口
            $setFunction = 'getProcessDetail';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工序提交统一接口
            $setFunction = 'processSubmit';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工序工单过程添加
            $router->get('addCourse','ProcessController@setCourse');
            $router->post('addCourse','ProcessController@setCourse');
            //工单工序基础信息修改
            $router->get('modify/base','ProcessController@orderBaseModify');
            $router->post('modify/base','ProcessController@orderBaseModify');
            //工单地址信息修改
            $router->get('modify/orderAddress','ProcessController@distributionModify');
            $router->post('modify/orderAddress','ProcessController@distributionModify');
            //工单工序信息修改
            $router->get('modify/process','ProcessController@orderProcessModify');
            $router->post('modify/process','ProcessController@orderProcessModify');
            //员工工单工序列表
            $router->get('processList','CourseController@processLists');
            $router->post('processList','CourseController@processLists');
            //员工工单工序工单列表
            $router->get('courseOrderList','CourseController@courseList');
            $router->post('courseOrderList','CourseController@courseList');
            //员工工单工序工单详情
            $router->get('courseOrderDetail','CourseController@courseDetail');
            $router->post('courseOrderDetail','CourseController@courseDetail');
            //员工工单工序工单详情提交
            $router->get('courseOrderDetailSubmit','CourseController@courseDetailSubmit');
            $router->post('courseOrderDetailSubmit','CourseController@courseDetailSubmit');

            //管理员工单详情
            $setFunction = 'getManagerOrderDetail';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //管理员工单详情-多工序列表展示
            $setFunction = 'getManagerOrderDetailList';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工单-再来一单
            $setFunction = 'copyOrder';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工单-草稿箱-列表
            $router->get('preList','OrderPreController@lists');
            $router->post('preList','OrderPreController@lists');

            //工单-草稿箱-删除
            $router->get('preDel','OrderPreController@delete');
            $router->post('preDel','OrderPreController@delete');

            //工单删除
            $setFunction = 'orderDelete';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //下单人分派给工序管理员-获取分派列表
            $setFunction = 'distributionAction';
            $router->get('/'.$setFunction,'PermissionController@'.$setFunction);
            $router->post('/'.$setFunction,'PermissionController@'.$setFunction);

            //下单人分派给工序管理员-确认分派
            $setFunction = 'orderConfirmAssignment';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工序管理员分派给员工-获取分派列表
            $setFunction = 'orderCourseAssignment';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工序管理员分派给员工-数据提交
            $setFunction = 'orderCourseAssignmentSubmit';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //分派用户工单详情页面
            $setFunction = 'getOrderDetailAssignment';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工单工序详情
            $setFunction = 'getProcessCourseInfoWithList';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //查看被分配员工信息页面（厂长查看接单员工详情页面）
            $setFunction = 'getOrderDetailCourseAssignment';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工单各类型数量接口
            $setFunction = 'getOrderAllTypeNum';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工单详情新接口-未完工
            $setFunction = 'getOrderDetailNewNoComplete';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);


            //工单详情新接口-已完工
            $setFunction = 'getOrderDetailNewComplete';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);


            //下单人工单分配类型(分配工序管理员、分配员工、直接分派（只有1个员工）)
            $setFunction = 'getOrderManageAssignmentType';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //主工单工单详情-新接口
            $setFunction = 'getManagerOrderDetailListNew';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //获取产品示例图
            $setFunction = 'getOrderProductionCaseDiagram';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //获取工单报表
            $setFunction = 'getOrderReport';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //获取工单列表筛选状态列表
            $setFunction = 'getOrderListFilterStatus';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //获取工单列表筛选状态列表
            $setFunction = 'getOrderListFilterStatus';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //员工确认开工-判断是否可以开工
            $setFunction = 'checkConfirmStart';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //员工分批提交完成数量
            $setFunction = 'submitOrderProcessCourseGradation';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //下单人给分派员工工单-基础页面
            $setFunction = 'manageOrderCourseAssignment';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //下单人给分派员工工单-提交
            $setFunction = 'manageOrderCourseAssignmentSubmit';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //获取原始客户订单列表
            $setFunction = 'getOriginalCustomerOrderList';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //获取原始客户详情
            $setFunction = 'getOriginalCustomerOrderDetail';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //获取工单-版关联详情
            $setFunction = 'getOrderPlateDetail';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //获取工单-版关联详情
            $setFunction = 'getCompanyList';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //订单类型提交
            $setFunction = 'customerOrderTypeSubmit';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //订单创建-基础信息-选项参数获取
            $setFunction = 'customerOrderPreBaseInfo';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //订单创建-基础信息-提交
            $setFunction = 'customerOrderPreBaseSubmit';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //订单创建-工序信息获取统一接口
            $setFunction = 'getCustomerProcessDetail';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //订单创建-工序提交统一接口
            $setFunction = 'customerProcessSubmit';
            $router->any('/customerrocessSubmit','IndexController@'.$setFunction);
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //订单详情
            $setFunction = 'getCustomerOrderDetail';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //反馈信息列表
            $setFunction = 'getFeedbackList';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //获得工艺相关反馈信息列表 通过工艺名
            $setFunction = 'getRelatedFeedbackList';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //获得工艺相关反馈信息列表 通过订单id
            $setFunction = 'getRelatedFeedbackListByCustomerOrderId';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //订单转工单
            $setFunction = 'customerOrderToOrder';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //订单开票
            $setFunction = 'customerOrderBillingInfo';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //订单开票-数据提交
            $setFunction = 'customerOrderBillingSubmit';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //订单再来一单，获取开票消息等基础信息
            $setFunction = 'copyCustomerOrderFirst';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //补充接口，创建订单第一步，提供默认值
            $setFunction = 'createCustomerOrderFirst';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //未派发列表(新)
            $setFunction = 'getNoAssignOrderList';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //下单人工单详情（新）
            $setFunction = 'getManagerOrderDetailNew';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //工序管理员工单详情（新）
            $setFunction = 'getProcessManagerOrderDetailNew';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //获取未议定价格订单列表
            $setFunction = 'getCustomerOrderNoDealPriceList';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //获取未议定价格订单详情
            $setFunction = 'getCustomerOrderNoDealPriceDetail';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //提交价格（意见）
            $setFunction = 'customerOrderPriceDeal';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //设置工单员工计件工资
            $setFunction = 'setOrderPieceWage';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //批量设置工单员工计件工资
            $setFunction = 'setOrderPieceWageAll';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //完整订单打印
            $setFunction = 'getCustomerOrderDetailPrint';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //订单-草稿箱-列表
            $router->any('customerOrderPreList','OrderPreController@customerOrderPreList');

            //订单-草稿箱-删除
            $router->any('customerOrderPreDelete','OrderPreController@customerOrderPreDelete');

            //员工成品入库
            $setFunction = 'employeeFinishedProduct';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //工序管理员修改员工提交的完工（废品）数量
            $setFunction = 'updateOrderProcessCourseGradation';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //工单相关材料详情页面
            $setFunction = 'getOrderMaterialDetail';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //工序管理员领取材料界面
            $setFunction = 'orderProcessManageReceiveMaterial';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //工序管理员用料情况界面
            $setFunction = 'orderProcessManageUseMaterial';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //工序管理员用料情况提交
            $setFunction = 'orderProcessManageUseMaterialSubmit';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //入库筛选页面
            $setFunction = 'getPurchaseFilterDetail';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //入库提交
            $setFunction = 'getPurchaseFilterSubmit';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //下单人查看工序管理员领取材料详情
            $setFunction = 'getOrderProcessManageReceiveMaterialDetail';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //订单价格确定记录
            $setFunction = 'getCustomerOrderPriceLog';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //工单领材扫码验证
            $setFunction = 'getOrderReceiveMaterialCheck';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //工单领材扫码，获取码对应的详情（验证是否重复领取）
            $setFunction = 'getOrderReceiveMaterialQr';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //工单用料详情（余废退）扫码，获取码对应的详情（验证是否重复领取）
            $setFunction = 'getOrderSubmitMaterialQr';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //工单用料详情（余废退），提交具体数量
            $setFunction = 'getOrderSubmitMaterialNumber';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //工单用料详情（余废退）扫码，清除之前的领取记录
            $setFunction = 'clearSubmitMaterialQrLog';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //订单反馈信息提交
            $setFunction = 'customerOrderFeedbackSubmit';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //退货验证页面
            $setFunction = 'getReturnPurchaseFilterDetail';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //退货验证页面-提交
            $setFunction = 'getReturnPurchaseFilterSubmit';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //工序管理员领取材料分次提交
            $setFunction = 'orderMaterialReceiveGradationSubmit';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //领材确认领取界面，通过码的ID返回对应的材料信息
            $setFunction = 'getOrderMaterialConfirmReceive';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);


            //采购申请选择材料获取材料详情
            $setFunction = 'getPurchaseMaterialInfo';
            $router->any('/'.$setFunction,'IndexController@'.$setFunction);

            //查看订单创建的工单
            $router->any('history-list','OrderController@historyList');
            $router->any('history-status','OrderController@historyFilterStatus');

            //获取关联工单列表
            $router->any('getRelateOrderList','IndexController@getRelateOrderList');

            //成品入库验收界面
            $router->any('getFinishedProductCheck','IndexController@getFinishedProductCheck');

            //成品入库验收提交
            $router->any('finishedProductCheckSubmit','IndexController@finishedProductCheckSubmit');


            //获取用料提交历史记录
            $router->any('materialSubmitHistory','IndexController@materialSubmitHistory');

            //获取待入库列表 zhuyujun 20181226
            $router->any('getWaitWarehousingList','OrderController@getWaitWarehousingList');

            //半成品待打印入口
            $router->any('getWaitPrintOrderProcessProduct','OrderController@getWaitPrintOrderProcessProduct');

            //半成品打印入库
            $router->any('printOrderProcessProduct','OrderController@printOrderProcessProduct');

            //半成品打印结果
            $router->any('getOrderProcessProductPrintHistory','OrderController@getOrderProcessProductPrintHistory');

            //获取省市区数据接口-预留
            $setFunction = 'getCityList';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //测试模块
            $setFunction = 'test';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

        });
    }

}